//
//  ContentController_iPad.m
//  WebPDA
//
//  Created by Justin Yip on 8/27/10.
//  Copyright 2010 TenNights.com. All rights reserved.
//

#import "ContentController_iPad.h"


@implementation ContentController_iPad
@synthesize splitViewController;
@synthesize d;
@synthesize popoverController;

- (UIView *)view
{
    return splitViewController.view;
}

#pragma mark -
#pragma mark Split view support

- (void)splitViewController:(UISplitViewController*)svc willHideViewController:(UIViewController *)aViewController withBarButtonItem:(UIBarButtonItem*)barButtonItem forPopoverController:(UIPopoverController*)pc {
	barButtonItem.title = @"导航";
    [d.navBar.topItem setLeftBarButtonItem:barButtonItem animated:NO];
    self.popoverController = pc;
}

- (void)splitViewController:(UISplitViewController*)svc willShowViewController:(UIViewController *)aViewController invalidatingBarButtonItem:(UIBarButtonItem *)button {
	[d.navBar.topItem setLeftBarButtonItem:nil animated:NO];
    self.popoverController = nil;
}

-(void)setPassenger:(Passenger*)p {
	[d setPassenger:p];
}

#pragma mark -
#pragma mark Memory Management

- (void)dealloc
{
	[popoverController release];
    [splitViewController release];
    [d release];
    [super dealloc];
}

@end
